Ext.define('jwawa.erp.cfg.searchPage.SearchItemShell', {
    extend: 'jwawa.erp.framework.ShellContainer',
    handlerClass: 'jwawa.erp.cfg.searchPage.SearchItemHandler',
    alias: 'widget.cfgSearchItemShell',
    height: 350,
    width: 420,
    title: '检索页明细',
    closeable: true,
    resizable: false,
    layout: {type: 'fit'},
    icon: '/img/page.png',
    dockedItems: [
        {
            xtype: 'toolbar',
            flex: 1,
            dock: 'top',
            items: [
                {
                    itemId: 'saveAndNewSearchItemButton',
                    xtype: 'button',
                    text: '保存并添加',
                    icon: '/img/disk_add.png'
                },
                {
                    itemId: 'saveSearchItemButton',
                    xtype: 'button',
                    text: '保存',
                    icon: '/img/disk.png'
                },
                {
                    itemId: 'newSearchItemButton',
                    xtype: 'button',
                    text: '新建',
                    icon: '/img/page_add.png'
                },
                {
                    itemId: 'delSearchItemButton',
                    xtype: 'button',
                    text: '删除',
                    icon: '/img/page_delete.png'
                },
                {
                    xtype: 'tbseparator'
                },
                {
                    itemId: 'closeEditWinButton',
                    xtype: 'button',
                    text: '关闭',
                    icon: '/img/door_out.png'
                }
            ]
        }
    ],
    items: [
        {
            itemId: 'searchItemFormPanel',
            xtype: 'form',
            bodyPadding: 10,
            border: false,
            plugins:[{ptype: 'jwawaSubmitPlugin'}],
            layout: {
                type: 'vbox',
                align: 'stretch'
            },
            fieldDefaults:{
                selectOnFocus: true
            },
            items: [
                {
                    name: 'id',
                    xtype: 'hiddenfield'
                },
                {
                    itemId: 'pageIdField',
                    name: 'page_id',
                    xtype: 'hiddenfield'
                },
                {
                    itemId: 'entityHeaderIdField',
                    name: 'entity_header_id',
                    xtype: 'hiddenfield'
                },
                {
                    itemId: 'pageNameField',
                    name: 'page_name',
                    xtype: 'displayfield',
                    fieldLabel: '页面名称',
                    submitValue: false
                },
                {
                    itemId: 'entityDetialIdCombo',
                    name: 'entity_detail_id',
                    xtype: 'jwawaCombobox',
                    fieldLabel: '属性名称',
                    valueField: 'id',
                    displayField: 'entity_field_name',
                    queryMode: 'local',
                    editable : true,
                    kbNav: true,
                    allowBlank: false
                },
                {
                    itemId: 'entityFieldLabel',
                    name: 'entity_field_label',
                    xtype: 'displayfield',
                    fieldLabel: '属性标签',
                    allowBlank: false
                },
                {
                    name: 'item_type',
                    xtype: 'textfield',
                    fieldLabel: '数据类型',
                    kbNav: true,
                    allowBlank: false
                },
                {
                    name: 'item_class',
                    xtype: 'textfield',
                    fieldLabel: '控件类名',
                    kbNav: true,
                    allowBlank: false
                },
                {
                    name: 'condition_flag',
                    xtype: 'textfield',
                    fieldLabel: '条件操作',
                    kbNav: true,
                    allowBlank: false
                },
                {
                    name: 'item_cfg',
                    xtype: 'textareafield',
                    height: 85,
                    fieldLabel: '配置参数',
                    kbNav: true,
                    kbSubmit: true
                },
                {
                    name: 'seq',
                    xtype: 'displayfield',
                    fieldLabel: '顺序号',
                    submitValue: false
                }
            ]
        }
    ]
});